package com.neu.service.impl;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neu.domain.Registered;
import com.neu.mapper.RegisteredMapper;
import com.neu.service.RegisteredService;
@Service("registeredServic")
public class RegisteredServiceImpl implements RegisteredService{
	@Autowired
	private RegisteredMapper registeredMapper;

	@Override
	public String insertRegistered(Registered registered) {
		String message="";
		int row=registeredMapper.insertRegistered(registered);
		//如果插入成功
		if(row>0) {
			message="挂号成功";
		}else {
			message="挂号失败，请重新挂号";
		}
		return message;
		
	}

	@Override
	public List<Registered> findRegisteredRecoed() {
		
		return registeredMapper.findRegisteredRecoed();
	}

	@Override
	public List<Registered> findRegisteredByDocname(String docname) {
		
		return registeredMapper.findRegisteredByDocname(docname);
	}

	@Override
	public Registered findRegisteredById(Integer personid) {
		
		return registeredMapper.findRegisteredById(personid);
	}

	@Override
	public int updateSeeindSateByPersonid(Integer personid) {
		
		return registeredMapper.updateSeeindSateByPersonid(personid);
	}

	@Override
	public boolean updataRegSateById(Integer personid) {
		int row=registeredMapper.updataRegSateById(personid);
		if(row>0) {
			return true;
		}
		return false;
	}

	

	
	
	

}
